//
//  LSZSongCollectionHeaderCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/5/25.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZSongCollectionHeaderCell.h"

@implementation LSZSongCollectionHeaderCell

-(id)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        self.butChange = [[UIButton alloc]init];
        [self addSubview:self.butChange];

        self.imageViewChange = [[UIImageView alloc]init];
        self.imageViewChange.image = [UIImage imageNamed:@"收藏展开"];
        [self.butChange addSubview:self.imageViewChange];

        self.labelChange = [[UILabel alloc]init];
        self.labelChange.textColor = lightColor;
        self.labelChange.text = @"我创建的歌单";
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelChange font:14.5];
        [self.butChange addSubview:self.labelChange];

        self.butSetUp = [[UIButton alloc]init];
        [self addSubview:self.butSetUp];
        self.imageSetUp = [[UIImageView alloc]init];
        self.imageSetUp.image = [UIImage imageNamed:@"收藏设置"];
        [self.butSetUp addSubview:self.imageSetUp];

        self.labelOk = [[UILabel alloc]init];
        self.labelOk.textColor = titleColorLSZ;
        self.labelOk.text = @"完成";
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelOk font:14.5];
        [self.butSetUp addSubview:self.labelOk];

        if (ScreenWidth == 320) {
            //5
            self.butChange.frame = CGRectMake(0, 0, ScreenWidth/3*2, 35);
            self.butSetUp.frame = CGRectMake(CGRectGetMaxX(self.butChange.frame), 0, ScreenWidth/3 , 35);
            self.imageViewChange.frame = CGRectMake(15,9, 17,17);
            self.labelChange.frame = CGRectMake(CGRectGetMaxX(self.imageViewChange.frame)+10, 7, self.butChange.frame.size.width-CGRectGetMaxX(self.imageViewChange.frame)-10, 21);
            self.imageSetUp.frame = CGRectMake(self.butSetUp.frame.size.width-40,(self.butSetUp.frame.size.height-17)/2, 17, 17);
            self.labelOk.frame =CGRectMake(self.butSetUp.frame.size.width-50,(self.butSetUp.frame.size.height-25)/2,50, 25);
        }else if(ScreenWidth == 375){
            // 6 7
            self.butChange.frame = CGRectMake(0, 0, ScreenWidth/3*2, 40);
            self.butSetUp.frame = CGRectMake(CGRectGetMaxX(self.butChange.frame), 0, ScreenWidth/3 , 40);
            self.imageViewChange.frame = CGRectMake(15,(self.butChange.frame.size.height-18)/2, 18,18);
            self.labelChange.frame = CGRectMake(CGRectGetMaxX(self.imageViewChange.frame)+10, 10, self.butChange.frame.size.width-CGRectGetMaxX(self.imageViewChange.frame)-10, 20);
            self.imageSetUp.frame = CGRectMake(self.butSetUp.frame.size.width-40,(self.butSetUp.frame.size.height-18)/2, 18, 18);
            self.labelOk.frame =CGRectMake(self.butSetUp.frame.size.width-50,(self.butSetUp.frame.size.height-25)/2,50, 25);
        }else {
            //plus
            self.butChange.frame = CGRectMake(0, 0, ScreenWidth/3*2, 48);
            self.butSetUp.frame = CGRectMake(CGRectGetMaxX(self.butChange.frame), 0, ScreenWidth/3 , 48);
            self.imageViewChange.frame = CGRectMake(15,(self.butChange.frame.size.height-19)/2, 19,19);
            self.labelChange.frame = CGRectMake(CGRectGetMaxX(self.imageViewChange.frame)+10, 13, self.butChange.frame.size.width-CGRectGetMaxX(self.imageViewChange.frame)-10, 22);
            self.imageSetUp.frame = CGRectMake(self.butSetUp.frame.size.width-40,(self.butSetUp.frame.size.height-19)/2, 19, 19);
            self.labelOk.frame =CGRectMake(self.butSetUp.frame.size.width-50,(self.butSetUp.frame.size.height-25)/2,50, 25);
        }
    }
    return self;
}
@end
